package com.material.c2c.web.util;

import com.cpt.framework.core.OperationResult;
import com.cpt.framework.web.JsonResult;

public class ControllerUtil {
	public static JsonResult getResult(OperationResult oper) {
	    if(oper.isSuccess()) {
	      return JsonResult.SUCCEED;
	    } else {
	      return JsonResult.failed(oper.toString());
	    }
	  }
}
